<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>圆环加载指示器</title>
    <link rel="stylesheet" href="./css/reset.css" />
    <style>
      body {
        background-color: #000;
      }

      .progress-container {
        width: 200px;
        height: 200px;
        border: 16px solid #000;
        border-radius: 50%;
        position: relative;
        margin: 100px auto;
      }

      .progress-bar {
        position: absolute;
        /* 要考虑定位元素的边框宽度 */
        top: -16px;
        left: -16px;
        right: -16px;
        bottom: -16px;
        border-radius: 50%;
        background: conic-gradient(#32c5a9, transparent 40%);
      }

      .progress-bar::before {
        content: "";
        width: 12px;
        height: 12px;
        position: absolute;
        background-color: #fff;
        top: 2px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 50%;
        box-shadow: 0 0 4px 2px rgb(108, 199, 241);
      }

      .progress-container::after {
        content: "";
        position: absolute;
        background-color: #000;
        border-radius: 50%;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
      }

      /* 旋转动画类 */
      .animation-rotate {
        /* 调用动画实现旋转 */
        animation: rotate 1s ease infinite;
      }

      /* 定义旋转动画 */
      @keyframes rotate {
        0% {
          transform: rotate(0deg);
        }

        100% {
          transform: rotate(-360deg);
        }
      }
    </style>
  </head>
  <body>
    <div class="progress-container animation-rotate">
      <div class="progress-bar"></div>
    </div>
  </body>
</html>
